Integrand size = 33, antiderivative size = 110 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=a^2 (A+2 C) x+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 (A+C) \sin (c+d x)}{d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {A \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d} \]
a^2*(A+2*C)*x+a^2*C*arctanh(sin(d*x+c))/d+a^2*(A+C)*sin(d*x+c)/d+1/3*A*cos (d*x+c)^2*(a+a*sec(d*x+c))^2*sin(d*x+c)/d+1/3*A*cos(d*x+c)*(a^2+a^2*sec(d* x+c))*sin(d*x+c)/d
Time = 1.17 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.99 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 \left (12 A d x+24 C d x-12 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+3 (7 A+4 C) \sin (c+d x)+6 A \sin (2 (c+d x))+A \sin (3 (c+d x))\right )}{12 d} \]
(a^2*(12*A*d*x + 24*C*d*x - 12*C*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 12*C*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 3*(7*A + 4*C)*Sin[c + d* x] + 6*A*Sin[2*(c + d*x)] + A*Sin[3*(c + d*x)]))/(12*d)
Time = 0.66 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.07, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3042, 4575, 3042, 4505, 27, 3042, 4484, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a \sec (c+d x)+a)^2 \left (A+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4575 |
\(\displaystyle \frac {\int \cos ^2(c+d x) (\sec (c+d x) a+a)^2 (2 a A+3 a C \sec (c+d x))dx}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (2 a A+3 a C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 4505 |
\(\displaystyle \frac {\frac {1}{2} \int 6 \cos (c+d x) (\sec (c+d x) a+a) \left ((A+C) a^2+C \sec (c+d x) a^2\right )dx+\frac {A \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {3 \int \cos (c+d x) (\sec (c+d x) a+a) \left ((A+C) a^2+C \sec (c+d x) a^2\right )dx+\frac {A \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left ((A+C) a^2+C \csc \left (c+d x+\frac {\pi }{2}\right ) a^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {A \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {3 \left (\frac {a^3 (A+C) \sin (c+d x)}{d}-\int \left (-\left ((A+2 C) a^3\right )-C \sec (c+d x) a^3\right )dx\right )+\frac {A \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 \left (\frac {a^3 (A+C) \sin (c+d x)}{d}+a^3 x (A+2 C)+\frac {a^3 C \text {arctanh}(\sin (c+d x))}{d}\right )+\frac {A \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}}{3 a}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^2}{3 d}\) |
(A*Cos[c + d*x]^2*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + ((A*Cos[c + d*x]*(a^3 + a^3*Sec[c + d*x])*Sin[c + d*x])/d + 3*(a^3*(A + 2*C)*x + (a^3 *C*ArcTanh[Sin[c + d*x]])/d + (a^3*(A + C)*Sin[c + d*x])/d))/(3*a)
3.1.98.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a*A*Cot [e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x] - Sim p[b/(a*d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Sim p[a*A*(m - n - 1) - b*B*n - (a*B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0 ] && GtQ[m, 1/2] && LtQ[n, -1]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_. ))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[A*Co t[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/( b*d*n) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[a*A*m - b *(A*(m + n + 1) + C*n)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, C, m}, x] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)] && (LtQ[n, -2^(-1)] || EqQ[m + n + 1, 0])
Time = 0.31 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.75
method | result | size |
parallelrisch | \(\frac {a^{2} \left (-C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {A \sin \left (2 d x +2 c \right )}{2}+\frac {A \sin \left (3 d x +3 c \right )}{12}+\left (\frac {7 A}{4}+C \right ) \sin \left (d x +c \right )+\left (A +2 C \right ) x d \right )}{d}\) | \(82\) |
derivativedivides | \(\frac {\frac {a^{2} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+C \,a^{2} \sin \left (d x +c \right )+2 a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 C \,a^{2} \left (d x +c \right )+a^{2} A \sin \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(108\) |
default | \(\frac {\frac {a^{2} A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+C \,a^{2} \sin \left (d x +c \right )+2 a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 C \,a^{2} \left (d x +c \right )+a^{2} A \sin \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(108\) |
risch | \(a^{2} A x +2 a^{2} x C -\frac {7 i a^{2} A \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {7 i a^{2} A \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {a^{2} A \sin \left (3 d x +3 c \right )}{12 d}+\frac {a^{2} A \sin \left (2 d x +2 c \right )}{2 d}\) | \(170\) |
norman | \(\frac {\left (-a^{2} A -2 C \,a^{2}\right ) x +\left (-3 a^{2} A -6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (a^{2} A +2 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (3 a^{2} A +6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {4 a^{2} \left (A -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {4 a^{2} \left (A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {2 a^{2} \left (A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}-\frac {2 a^{2} \left (A +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}-\frac {2 a^{2} \left (3 A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{2} \left (19 A +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(307\) |
a^2*(-C*ln(tan(1/2*d*x+1/2*c)-1)+C*ln(tan(1/2*d*x+1/2*c)+1)+1/2*A*sin(2*d* x+2*c)+1/12*A*sin(3*d*x+3*c)+(7/4*A+C)*sin(d*x+c)+(A+2*C)*x*d)/d
Time = 0.28 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.86 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \, {\left (A + 2 \, C\right )} a^{2} d x + 3 \, C a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, C a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a^{2} \cos \left (d x + c\right )^{2} + 3 \, A a^{2} \cos \left (d x + c\right ) + {\left (5 \, A + 3 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
1/6*(6*(A + 2*C)*a^2*d*x + 3*C*a^2*log(sin(d*x + c) + 1) - 3*C*a^2*log(-si n(d*x + c) + 1) + 2*(A*a^2*cos(d*x + c)^2 + 3*A*a^2*cos(d*x + c) + (5*A + 3*C)*a^2)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=a^{2} \left (\int A \cos ^{3}{\left (c + d x \right )}\, dx + \int 2 A \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int A \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 C \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(A*cos(c + d*x)**3, x) + Integral(2*A*cos(c + d*x)**3*sec(c + d*x), x) + Integral(A*cos(c + d*x)**3*sec(c + d*x)**2, x) + Integral(C*c os(c + d*x)**3*sec(c + d*x)**2, x) + Integral(2*C*cos(c + d*x)**3*sec(c + d*x)**3, x) + Integral(C*cos(c + d*x)**3*sec(c + d*x)**4, x))
Time = 0.22 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.04 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} - 12 \, {\left (d x + c\right )} C a^{2} - 3 \, C a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 6 \, A a^{2} \sin \left (d x + c\right ) - 6 \, C a^{2} \sin \left (d x + c\right )}{6 \, d} \]
-1/6*(2*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^2 - 3*(2*d*x + 2*c + sin(2*d *x + 2*c))*A*a^2 - 12*(d*x + c)*C*a^2 - 3*C*a^2*(log(sin(d*x + c) + 1) - l og(sin(d*x + c) - 1)) - 6*A*a^2*sin(d*x + c) - 6*C*a^2*sin(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.63 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (A a^{2} + 2 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (3 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 8 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \]
1/3*(3*C*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*C*a^2*log(abs(tan(1/2* d*x + 1/2*c) - 1)) + 3*(A*a^2 + 2*C*a^2)*(d*x + c) + 2*(3*A*a^2*tan(1/2*d* x + 1/2*c)^5 + 3*C*a^2*tan(1/2*d*x + 1/2*c)^5 + 8*A*a^2*tan(1/2*d*x + 1/2* c)^3 + 6*C*a^2*tan(1/2*d*x + 1/2*c)^3 + 9*A*a^2*tan(1/2*d*x + 1/2*c) + 3*C *a^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 15.10 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.45 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {7\,A\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,C\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {A\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d} \]
(7*A*a^2*sin(c + d*x))/(4*d) + (C*a^2*sin(c + d*x))/d + (2*A*a^2*atan(sin( c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (4*C*a^2*atan(sin(c/2 + (d*x)/2)/c os(c/2 + (d*x)/2)))/d + (2*C*a^2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/ 2)))/d + (A*a^2*sin(2*c + 2*d*x))/(2*d) + (A*a^2*sin(3*c + 3*d*x))/(12*d)